//
//  DYCardSettingVC.m
//  kafuMerchant
//
//  Created by 帝云科技 on 2018/9/21.
//  Copyright © 2018年 帝云科技. All rights reserved.
//

#import "DYCardSettingVC.h"
#import "DYCardSettingCell.h"
#import "DYShopCardSetVC.h"

@interface DYCardSettingVC ()

@end

@implementation DYCardSettingVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title=@"卡片设置";
}
-(void)dy_initUI
{
    [super dy_initUI];
    
    self.tableView.backgroundColor=WhiteColor;
    [self.tableView registerClass:[DYCardSettingCell class] forCellReuseIdentifier:@"DYCardSettingCell"];
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return BILIHEIGHT(210);
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    DYCardSettingCell *cell=[tableView dequeueReusableCellWithIdentifier:@"DYCardSettingCell" forIndexPath:indexPath];
    
    @weakify(self);
    cell.cardSettingBlock = ^(NSString *text) {
        @strongify(self);
        if ([text isEqualToString:@"自助发卡"]) {
            XHQALERT_TWO_ONE_ACTION_SHOW(@"收款设置完成后才可进行发卡", nil, @"设置收款", @"取消", [self cardSet]);
        }
    };
    
    return cell;
}
-(void)cardSet
{
    DYShopCardSetVC *vc=[[DYShopCardSetVC alloc]init];
    [self.navigationController pushViewController:vc animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
